package com.shop.flowershopmanager.controller;

import com.shop.flowershopmanager.service.CategoryService;
import com.shop.flowershopmanager.utils.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
public class CategoryController {
    @Resource
    private CategoryService categoryService;

    @GetMapping("/v1/getAllCategory")
    public R<Object> getAllCategory(){
        return R.ok(categoryService.getAllCategory());
    }
}
